package com.sport.facilities.booking.system.httptask;

import android.content.Context;

public class NoticeBoardTask extends BasicTask {

	public NoticeBoardTask(Context ctx,OnTaskCompleted completeAction) {
		super(ctx);
		this.listener = completeAction;
	}
	
	public void fnGetNotice() {
		try {
			super.onPreExecute();
			super.execute(PATH_NOTICE);
		} catch (Exception e) {
			this.listener.onTaskFailed(e.getMessage());
		}
	}
	
	@Override
    protected void onPostExecute(String result) {
		super.onPostExecute(result);
		if(this.listener!=null){
			this.listener.onTaskCompleted(result);
		}
    }

	public void setCompletedAction(OnTaskCompleted completeAction) {
		this.listener = completeAction;
	}
}